package com.eagle.rate.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import org.apache.struts2.ServletActionContext;
import com.opensymphony.xwork2.ActionSupport;

public class BaseAction extends ActionSupport {
	protected static final String INDEX = "index";//主页
	protected static final String AUTH = "auth";//授权页面
	protected static final String ERROR = "error";//出错页面

	/**
	 * 取得HttpSession函数
	 */
	public static HttpSession getSession() {
		return ServletActionContext.getRequest().getSession();
	}

	/**
	 * 取得HttpRequest函数.
	 */
	public static HttpServletRequest getRequest() {
		return ServletActionContext.getRequest();
	}

	/**
	 * 取得HttpResponse函数
	 */
	public static HttpServletResponse getResponse() {
		return ServletActionContext.getResponse();
	}
}
